#ifndef CONTACTLISTWIDGET_H
#define CONTACTLISTWIDGET_H

#include <QWidget>
#include <QVariant>
#include "Models/group.h"
#include "Models/pagetype.h"
#include "Controls/suspendscrollbar.h"

namespace Ui {
class ContactListWidget;
}

class ContactListWidget : public QWidget
{
    Q_OBJECT

public:
    explicit ContactListWidget(QWidget *parent = nullptr);
    ~ContactListWidget();

    void AddItem(Group *data);

private:
    Ui::ContactListWidget *ui;
    QWidget *m_widget;

    template<class T>
    T* getWidget(QWidget *item);

private slots:
    void onItemSelected(QWidget *item);

signals:
    void onItemClicked(QVariant var, PageType type);
};

#endif // CONTACTLISTWIDGET_H
